#include "StdAfx.h"
#include "ArbRecord.h"
#include <iostream>
#include <fstream>

ArbRecord::ArbRecord()
{
	//nodes = new Node[100];
	used = false;
}

void ArbRecord::setNode(int node, char * description, char dt, char c)
{
	nodes[node].setDataType(dt);
	nodes[node].setDescription(description);
	nodes[node].setValue(c);
	used = true;
}

void ArbRecord::setNode(int node, char * description, char dt, char *s)
{
	nodes[node].setDataType(dt);
	nodes[node].setDescription(description);
	nodes[node].setValue(s);
	used = true;
}

void ArbRecord::setNode(int node, char * description, char dt, int i)
{
	nodes[node].setDataType(dt);
	nodes[node].setDescription(description);
	nodes[node].setValue(i);
	used = true;
}

void ArbRecord::setNode(int node, char * description, char dt, double r)
{
	nodes[node].setDataType(dt);
	nodes[node].setDescription(description);
	nodes[node].setValue(r);
	used = true;
}

Node ArbRecord::getNode(int node)
{
	return nodes[node];
}

int ArbRecord::getNodeNumber()
{
	int count = 0;
	for(int i=0; i<100; i++)
	{
		if(nodes[i].used)
		{
			count++;
		}
	}

	return count;
}
